home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.3 KB | 121 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: TblPart.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef TBLPART_H
- #define TBLPART_H
-
- // ----- TablePart Includes -----
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWPARTNG_H
- #include "FWPartng.h"
- #endif
-
- #ifndef FWMNUITM_H
- #include "FWMnuItm.h"
- #endif
-
- #ifndef FWPOINT_H
- #include "FWPoint.h"
- #endif
-
- #ifndef FWFXMATH_H
- #include "FWFxMath.h"
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class CTableFrame;
- class CTableProxy;
- class CTableSelection;
- class CTableLinkManager;
- class CCell;
- class CTableContent;
-
- //========================================================================================
- // class CTablePart
- //========================================================================================
-
- class CTablePart : public FW_CEmbeddingPart
- {
- friend class CTableLinkManager;
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CTablePart)
-
- CTablePart(ODPart* odPart);
- virtual ~CTablePart();
-
- //----------------------------------------------------------------------------------------
- // API Inherited from FW_CPart
- //
- public:
- virtual void Initialize(Environment* ev);
-
- // ----- Factory Methods -----
- virtual FW_CFrame* NewFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- FW_Boolean fromStorage);
- virtual FW_CContent* NewPartContent(Environment* ev);
- virtual FW_CLinkManager* NewLinkManager(Environment* ev); // Override
-
-
- // ----- Menu bar support -----
- virtual FW_Boolean DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Boolean DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
-
- //----------------------------------------------------------------------------------------
- // Table-specific API
- //
- public:
- // ----- Change -----
- void PartChanged(Environment* ev);
-
- CTableContent* GetTableContent(Environment* ev) const
- {return fTableContent;}
- FW_CPresentation* GetTablePresentation(Environment* ev) const
- {return fTablePresentation;}
-
- // ----- Linking Support -----
- FW_Boolean IsLinkSelected(Environment* ev);
-
- CTableSelection* GetTableSelection(Environment* ev);
-
- void RegisterSubscribers(Environment* ev);
- FW_Boolean ShowLinkInfo(Environment* ev, FW_CFrame* frame);
-
- void AboutToClearCell(Environment* ev, const CCell& cell);
- void ChangeFrameStatus(Environment* ev, const CCell& cell, ODLinkStatus newStatus);
- void ProxyMoved(Environment* ev, const CCell& fromCell, const CCell& toCell);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CTableContent* fTableContent;
- FW_CPresentation* fTablePresentation;
-
- CTableLinkManager* fTableLinkManager;
- FW_Boolean fLinksRegistered;
- };
-
- #endif
-